package lyo.levelup.swing.hometask1;

import java.awt.BorderLayout;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

public class ButtonComponents extends JPanel
{

    public ButtonComponents()
    {
        addButtons();
    }

    private void addButtons()
    {
//        Box actionButtonBlockInnerRight = Box.createVerticalBox();
//        actionButtonBlockInnerRight.add(new JButton("MoveRight"));
//        actionButtonBlockInnerRight.add(new JButton("MoveLeft"));
        JPanel buttonPanel = new JPanel(new BorderLayout());
        Box lineBox1 = Box.createHorizontalBox();
        Box lineBox2 = Box.createHorizontalBox();
        Box vertBox = Box.createVerticalBox();
        JButton moveRight = new JButton("MoveRight");
        JButton moveLeft = new JButton("MoveLeft");
        JButton start = new JButton("START");
        JButton pause = new JButton("PAUSE");
        JButton stop = new JButton("STOP");
        lineBox1.add(moveRight);
        lineBox1.add(moveLeft);
        lineBox2.add(start);
        lineBox2.add(pause);
        lineBox2.add(stop);
        vertBox.add(lineBox1,BorderLayout.NORTH);
        vertBox.add(lineBox2,BorderLayout.SOUTH);
        buttonPanel.add(vertBox);
        add(buttonPanel);
    }
}